#include <QMouseEvent>

#include "itembutton.h"
#include "../constant.h"

ItemButton::ItemButton(QWidget *parent) : QPushButton(parent)
{
    this->setStyleSheet(COMBOXBACKCOLOR);
}

ItemButton::~ItemButton()
{
}

void ItemButton::mousePressEvent(QMouseEvent *event)
{

    if(event->button()==Qt::LeftButton)
    {
        emit mousePress(item);
    }
    mouseMoveEvent(event);
}

ItemBase *ItemButton::getItem() const
{
    return item;
}

void ItemButton::setItem(ItemBase *value)
{
    item = value;
}
